On binary reflected Gray codes and functions
نویسندگان
چکیده
The Binary Reflected Gray Code function b is defined as follows: If m is a nonnegative integer, then b(m) is the integer obtained when initial zeros are omitted from the binary reflected Gray code of length m. This paper examines this Gray code function and its inverse and gives simple algorithms to generate both. It also simplifies Conder’s result that the jth letter of the kth word of the binary reflected Gray code of length n, is (2n − 2n−j − 1 [2n − 2n−j−1 − k/2]) mod 2, by replacing the binomial coefficient by [(k-1)/(2n-j+1)+1/2].
منابع مشابه
A Dynamic Programming Approach to Generating a Binary Reflected Gray Code Sequence
A binary reflected Gray code (Gray code for short) is a one-to-one function G(i) of the integers 0 • i • 2 – 1 (for some pre-selected value of n) to binary numbers such that the binary number for G(i) and G(i+1) differ in exactly one bit. For example, with N = 3, the Gray codes (written in binary) are 000, 001, 011, 010, 110, 111, 101, 100. In this paper, we describe a dynamic programming algor...
متن کاملA note on Beckett-Gray codes and the relationship of Gray codes to data structures
In this paper we introduce a natural mathematical structure derived from Samuel Beckett’s play “Quad”. We call this structure a binary Beckett-Gray code. We enumerate all codes for n ≤ 6 and give examples for n = 7, 8. Beckett-Gray codes can be realized as successive states of a queue data structure. We show that the binary reflected Gray code can be realized as successive states of two stack d...
متن کاملBinary Quasi Equidistant and Reflected Codes in Mixed Numeration Systems
The problem of constructing quasi equidistant and reflected binary Gray code sequences and code in a mixed factorial, Fibonacci and binomial numeration systems is considered in the article. Some combinatorial constructions and machine algorithms synthesis sequences, based on the method of directed enumeration are offered. For selected parameters of sequences all quasi equidistant (for individua...
متن کاملProperties of Gray and Binary Representations
Representations are formalized as encodings that map the search space to the vertex set of a graph. We define the notion of bit equivalent encodings and show that for such encodings the corresponding Walsh coefficients are also conserved. We focus on Gray codes as particular types of encoding and present a review of properties related to the use of Gray codes. Gray codes are widely used in conj...
متن کاملExplicit definition of the binary reflected Gray codes
It is shown that for 1 j n and 1 k 2; the jth letter of the kth word of the binary re ected Gray code of length n is equal to the parity of the binomial coe cient 2 n 2 j C[2n 2 j 1 k=2] modulo 2. Also it is shown how this observation and the usual iterative de nition of the binary re ected Gray codes are revealed in a modi ed version of Sierpinski's gasket (Pascal's triangle modulo 2).
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Discrete Mathematics
دوره 308 شماره
صفحات -
تاریخ انتشار 2008